Page({
  data: {
    repairList: [] // 报修列表
  },
  goDetail(e) {
    wx.navigateTo({
      url: '/repair_pkg/pages/detail/index?id='+ e.mark.type,
    })
  },
  addRepair() {
    wx.navigateTo({
      url: '/repair_pkg/pages/form/index',
    })
  },
  onShow(){
    this.queryRepairList()
  },
  async queryRepairList(){
    const res = await wx.http({
      url: '/repair',
      method: 'GET',
      data: {
        current: 1,
        pageSize: 10
      }
    })
    // const repairList = res.data.rows
    this.setData({
      repairList: res.data.rows
    })
  }
})
